< Prev(J) / Next(K) > / View :

Filename: /text/sbasic/shared/03020408.xhp

(section: filelen) (bookmark: bm_id3153126)
FileLen function

FileLen 関数

FileLen Function [Runtime]
FileLen 関数[実行時](hd_id3153126.1)

Returns the length of a file in bytes.
ファイルのサイズをバイト単位で返します。(par_id3145068.2)

(/section: filelen)

Syntax:
構文:(hd_id3159414.3)

FileLen (Text As String)
FileLen (Text As String)(par_id3149656.4)

Return value:
戻り値:(hd_id3148798.5)

Long
ロング整数(par_id3156282.6)

Parameters:
パラメータ:(hd_id3150768.7)

Text: Any string expression that contains an unambiguous file specification. You can also use URL notation.
Text: ファイルの位置を明示的に指定した文字列表式。またURL 指定を用いることもできます。(par_id3153193.8)

This function determines the length of a file. If the FileLen function is called for an open file, it returns the file length before it was opened. To determine the current file length of an open file, use the Lof function.
この関数は、指定ファイルのサイズを取得するものです。オープン済みのファイルに対して FileLen 関数を使用すると、オープンした時点でのファイルサイズを返します。こうしたオープン済みファイルに対して、現在のファイルサイズを取得するのであれば、Lof 関数を使用する必要があります。(par_id3150439.9)

(embed text/sbasic/shared/00000003.xhp#errorcode : linkinfo)

Error Codes

エラーコード(hd_id3152869.37)

(/embed text/sbasic/shared/00000003.xhp#errorcode)

(embed text/sbasic/shared/00000003.xhp#err5 : linkinfo)

5 Invalid procedure call
5 無効なプロシージャー呼び出しです (par_id3150891.41)

(/embed text/sbasic/shared/00000003.xhp#err5)

Example:
例:(hd_id3163710.10)

Sub ExampleFileLen
Sub ExampleFileLen(par_id3159154.11)

msgbox FileLen("C:\autoexec.bat")
msgbox FileLen("C:\autoexec.bat")(par_id3145271.12)

end sub
end sub(par_id3145749.13)


< Prev / Next >